import request from '@/utils/request'

// 查询商业活动列表
export function listCommercialActivity(query) {
  return request({
    url: '/activitys/commercialActivity/list',
    method: 'get',
    params: query
  })
}

// 查询商业活动详细
export function getCommercialActivity(id) {
  return request({
    url: '/activitys/commercialActivity/' + id,
    method: 'get'
  })
}

// 新增商业活动
export function addCommercialActivity(data) {
  return request({
    url: '/activitys/commercialActivity',
    method: 'post',
    data: data
  })
}

// 修改商业活动
export function updateCommercialActivity(data) {
  return request({
    url: '/activitys/commercialActivity',
    method: 'put',
    data: data
  })
}

// 删除商业活动
export function delCommercialActivity(id) {
  return request({
    url: '/activitys/commercialActivity/' + id,
    method: 'delete'
  })
}
